<?php

namespace App\Http\Controllers\Test;

use Biz\Services\ExceptionService;
use Lumen\Core\Exceptions\BusinessException;

/**
 * ValidatorController.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class ExceptionController extends Controller
{
    /**
     * @var mixed
     */
    protected $service;

    /**
     * RepositoryController constructor.
     *
     * @param ExceptionService $service
     */
    public function __construct(ExceptionService $service)
    {
        $this->service = $service;
    }

    /**
     * Home.
     *
     * @return string
     */
    public function index()
    {
        $this->service->system();
    }

    /**
     * Home.
     *
     * @throws BusinessException
     *
     * @return string
     */
    public function business()
    {
        throw new BusinessException('哈哈哈');
    }
}
